package Java2;

import java.util.*;

public class Evenarray {
	public static void main(String[] args)
	{
		Scanner input = new Scanner(System.in);
		int num,temp;
		System.out.println("Enter the Length of array");
		num = input.nextInt();

		int[] evenarray = new int[num];
		int[] evenonlyarray = new int[num];
		System.out.println("Enter the array numbers");

		for(int i=0;i<evenarray.length;i++)
		{
			evenarray[i] = input.nextInt();
		}

		for(int i=0;i<evenarray.length-1;i++)
		{
			
			if(evenarray[i]%2 == 0)
			{
				for(int j=i;i<evenarray.length;j++)
				{
				temp = evenarray[i];
				evenarray[i] = evenarray[j];
				evenarray[j] = temp;
				}
		//		evenonlyarray[i] = evenarray[i];

			}
			else
			{
				i++;
				
			}


		}
		for(int i=0;i<evenonlyarray.length;i++)
		{
			System.out.println(evenonlyarray[i]);

		}
	}

}
